<template>
  <div>
    <B @selectHandler="selectHandler" @sendMessage="showHandler"  :keyWor="keyWord"></B>
  </div>
</template>
<script>
import B from './baiduzi.vue';
export default {
  components:{
    B
  },
  data() {
    return {
      keyWord: ["周星驰", "周润发", "最新新闻动态", "塔利班"],
      showLi: false,
      tabIndex: 1,
      val: "",
    };
  },
  methods: {
    selectHandler(index) {
      this.tabIndex = index;
    },
    clkHandler(index) {
      this.val = this.keyWord[index];
    },
  },
};
</script>
<style lang="css">
input {
  float: left;
  outline: none;
}
button {
  float: right;
  color: white;
}
input {
  width: 200px;
  height: 35px;
  border: none;
}
button {
  width: 55px;
  height: 35px;
  border: none;
  background-color: rgba(39, 39, 231, 0.842);
}
.box {
  width: 260px;
  margin: 0 auto;
  border: 1px solid black;
  overflow: hidden;
}
.list {
  width: 260px;
  margin: 0 auto;
}
.active {
  background-color: darkgray;
}
</style>